using System;

//	"CC" means "Constinous state and Continous decision (action)"

namespace Reinforcement
{
    public delegate void ActualAction(double[] state, double[] action, ref double[] act_action); // returns the distance between the given and the actual action
    public delegate void CCActionHandler(object sender, double[] result);
    
    public interface CCDecisionMaker	 //	continous state, continous action
    {
        //  we start in state "state"
        void CCStartInState(double[] state);

        //  what action do you advise to do?
        void CCAdviseAction(ref double[] decision);

        //  what happened then? 
        void CCThisHappened(double reward, double[] next_state);
    }

    public interface CCEnvironment  // 
    {
        //  begin a run
        void CCStartInRandomState();

        // what is the state of the environment? state is for the decision maker, extension is e.g. for drawing
        void CCGetCurrentState(ref double[] state, ref double[] state_extension); 

        // let's go 
        void CCMove(
                double[] decision     //  action(s) to be performed (in the same time of course)
                );

        
        event CCActionHandler CCMoveEvent;

    }
}
